home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 November / Freeware November 1998.img / dist / fw_UDELxntp.idb / usr / freeware / src / xntp-3.4o-export / lib / utvtoa.c.z / utvtoa.c
C/C++ Source or Header  |  1998-01-21  |  353b  |  22 lines

  1. /*
  2.  * utvtoa - return an asciized representation of an unsigned struct timeval
  3.  */
  4. #include <stdio.h>
  5. #include <sys/time.h>
  6.  
  7. #include "lib_strbuf.h"
  8. #include "ntp_stdlib.h"
  9.  
  10. char *
  11. utvtoa(tv)
  12.     struct timeval *tv;
  13. {
  14.     register char *buf;
  15.  
  16.     LIB_GETBUF(buf);
  17.     
  18.     (void) sprintf(buf, "%lu.%06lu", (u_long)tv->tv_sec,
  19.         (u_long)tv->tv_usec);
  20.     return buf;
  21. }
  22.